<div class="form">
    <?php $form=$this->beginWidget('CActiveForm', array(
            'id'=>'login-form',
            'enableAjaxValidation'=>true,
    )); ?>

    <?php echo Yii::app()->user->getFlash('name');?>
    <?php echo $form->errorSummary($model); ?>

    <div class="row">
        <?php echo $form->labelEx($model,'Логин'); ?>
        <?php echo $form->textField($model,'name'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model,'Пароль'); ?>
        <?php echo $form->passwordField($model,'password'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model,'Повтор пароля'); ?>
        <?php echo $form->passwordField($model,'password2'); ?>
    </div>

    <div class="row">
        <?php echo $form->labelEx($model,'email'); ?>
        <?php echo $form->textField($model,'mail'); ?>
    </div>

    <?php if(extension_loaded('gd')): ?>
    <div class="row" id="captch">
            <?php echo $form->labelEx($model,'Проверочный код'); ?>
        <div>
                <?php $this->widget('CCaptcha',
                        array('captchaAction' => '/site/captcha', 'clickableImage'=>TRUE,'buttonLabel' => '<br>обновить код'));
                ?><br>
                <?php echo $form->textField($model,'verifyCode'); ?>
        </div>
    </div>
    <?php endif; ?>


    <div class="row submit">
        <?php echo CHtml::submitButton('Зарегистрироватся'); ?>
    </div>

    <?php $this->endWidget(); ?>
</div><!-- form -->
